<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<script type="text/javascript">
			function Parent() {
			   this.isShow = true
			   this.info = {
			       name: "yhd",
			       age: 18,
			   };
			}
			
			Parent.prototype.getInfo = function() {
			   console.log(this.info);
			   console.log(this.isShow); // true
			}
			
			function Child() {};
			Child.prototype = new Parent();
			
			let child1 = new Child();
			child1.info.gender = "男";
			child1.getInfo();  // {name: "yhd", age: 18, gender: "男"}
			
			let child2 = new Child();
			child2.getInfo();  // {name: "yhd", age: 18, gender: "男"}
			child2.isShow = false
			
			console.log(child2.isShow); // false
			
		</script>
	</body>
</html>
